package cn.openea.perpartner.timeline.web.mapper;

import cn.openea.perpartner.timeline.web.entity.InsData;
import cn.openea.perpartner.timeline.web.entity.dto.UserGroupDto;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * (InsData)表数据库访问层
 *
 * @author Weird077
 * @since 2022-12-11 22:16:28
 */
@Repository
public interface InsDataMapper extends BaseMapper<InsData> {
    /**
     * 查询用户组
     * @param ticketId 工单id
     * @return
     */
    @Select("select distinct create_user as userId,create_user_name as nickName,create_user_avatar as avatar  from timeline_ins_data where ticket_id = #{ticketId}")
    List<UserGroupDto> selectUserGroup(String ticketId);

}

